package com.yingxin.yxerp.module.activiti.vo.resp;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yingxin.yx.framework.commons.enums.BusinessType;
import com.yingxin.yx.framework.commons.vo.ActivitCoreInformationRespVo;
import com.yingxin.yx.framework.commons.vo.CommonRespVo;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "ActivitiReplaceInfoRespVo对象", description = "表单")
public class ActivitiReplaceInfoRespVo extends CommonRespVo {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private String id;

    /**
     * 业务 id
     */
    private String bizId;

    /**
     * 业务类型
     */
    private String bizType;

    /**
     * 业务 no
     */
    private String bizNo;


    /**
     * 状态 0 待确认 1 已确认
     */
    private String approvalStatus;

    /**
     * 代审人
     */
    private String creatorId;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 待确认人
     */
    private String confirmId;

    private String confirmName;

    public String getApprovalStatusName(){
        return approvalStatus.equals("0") ? "待确认" : "已确认";
    }

    public String getBizTypeName(){
        return BusinessType.getEnum(bizType).getTypeName();
    }

    /**
     * app 手机端待审核列表核心信息集合
     */
    private List<ActivitCoreInformationRespVo> activitCoreInformationRespVos;

}
